package main

import (
	"flag"
	"github.com/valyala/fasthttp"
	"grpc.getaway.adminspro.padmins.com/internal/api/module/admin/bootstrap"
	"log"
	"strconv"
)

func main() {
	httpPort := flag.Int("port", 8001, "api-admin default listen port 8001")
	flag.Parse()
	httpServer := fasthttp.Server{
		Handler: bootstrap.HandlerFastHttp,
	}
	if e := httpServer.ListenAndServe("0.0.0.0:" + strconv.Itoa(*httpPort)); e != nil {
		log.Fatalf("error in ListenAndServe: %s", e)
	}
}
